/* Show title */
var txt0="[ Created by XIAO Yang & MEHAS Mehdi ]";
var txt1="Licence Info [DIV+CSS]";
var txt2="Master Miage [Table]";
var txt3="Master Pro Réseaux [Frame]";
var txt4="Master Pro Images[DIV+CSS+FoldingMenu]";
function writeText(id)
{
  if (id == "0") document.getElementById("title").innerHTML=txt0;
  else if (id == "1") document.getElementById("title").innerHTML=txt1;
  else if (id == "2") document.getElementById("title").innerHTML=txt2;
  else if (id == "3") document.getElementById("title").innerHTML=txt3;
  else if (id == "4") document.getElementById("title").innerHTML=txt4;
}

/* Change image */
bg0 = new Image();
bg1 = new Image();
bg2 = new Image();
bg3 = new Image();
bg4 = new Image();
bg0.src = "image/bg0.jpg";
bg1.src = "image/bg1.gif";
bg2.src = "image/bg2.gif";
bg3.src = "image/bg3.gif";
bg4.src = "image/bg4.gif";
function showImage(id){
if (id == "0") document.images[0].src = bg0.src;
else if (id == "1") document.images[0].src = bg1.src;
else if (id == "2") document.images[0].src = bg2.src;
else if (id == "3") document.images[0].src = bg3.src;
else if (id == "4") document.images[0].src = bg4.src;
}

/* Change the page's BG */
var backColor = new Array();
backColor[0] = "#cccccc";
backColor[1] = "#ed6942";
backColor[2] = "#00a1e9";
backColor[3] = "#23ac38";
backColor[4] = "#fef102";
function changeBackcolor(id)
{
  document.bgColor = backColor[id];
}

/* Mouse action */
function act(id)
{
  showImage(id);
  writeText(id);
  changeBackcolor(id);
}